<template>
  <v-card title="监听事件" class="mb-50">
    <vcu-chart-line :data="chartData" :settings="lineSettings" :title="title" @click="onClick" />
  </v-card>
</template>

<script>
export default {
  name: 'color-match',
  data() {
    return {
      title: {},
      chartData: {
        dimensions: {
          name: 'Week',
          data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
        },
        measures: [
          {
            name: 'pv',
            data: [256, 767, 1356, 2087, 803, 582, 432],
          },
        ],
      },
      lineSettings: {
        smooth: true,
        showSymbol: false,
        symbol: 'circle',
      },
    }
  },
  methods: {
    onClick(params) {
      this.title = {
        text: `选中维度：${params.name}`,
      }
    },
  },
}
</script>